<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: PMU Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.03</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.xhtml"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="inherits.xhtml"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.xhtml"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">PMU Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class provides access to CPU hardware counters.  
 <a href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_p_m_u_8h_source.xhtml">PMU.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af16eae86d803112e6466140aaced812b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#af16eae86d803112e6466140aaced812b">PMU</a> ()</td></tr>
<tr class="memdesc:af16eae86d803112e6466140aaced812b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#af16eae86d803112e6466140aaced812b">More...</a><br /></td></tr>
<tr class="separator:af16eae86d803112e6466140aaced812b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96bc7297c283c973784c216437bae762"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a96bc7297c283c973784c216437bae762">PMU</a> (uint64_t config)</td></tr>
<tr class="memdesc:a96bc7297c283c973784c216437bae762"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create <a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml" title="Class provides access to CPU hardware counters. ">PMU</a> with specified counter.  <a href="#a96bc7297c283c973784c216437bae762">More...</a><br /></td></tr>
<tr class="separator:a96bc7297c283c973784c216437bae762"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab30d96d1a047f366dd309049f139fa35"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#ab30d96d1a047f366dd309049f139fa35">~PMU</a> ()</td></tr>
<tr class="memdesc:ab30d96d1a047f366dd309049f139fa35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor.  <a href="#ab30d96d1a047f366dd309049f139fa35">More...</a><br /></td></tr>
<tr class="separator:ab30d96d1a047f366dd309049f139fa35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accfba41ff73f99ee744f8619f47bf413"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:accfba41ff73f99ee744f8619f47bf413"><td class="memTemplItemLeft" align="right" valign="top">T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#accfba41ff73f99ee744f8619f47bf413">get_value</a> () const </td></tr>
<tr class="memdesc:accfba41ff73f99ee744f8619f47bf413"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the counter value.  <a href="#accfba41ff73f99ee744f8619f47bf413">More...</a><br /></td></tr>
<tr class="separator:accfba41ff73f99ee744f8619f47bf413"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f1c02afefdd48c31913e6c358422727"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a9f1c02afefdd48c31913e6c358422727">open</a> (uint64_t config)</td></tr>
<tr class="memdesc:a9f1c02afefdd48c31913e6c358422727"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open the specified counter based on the default configuration.  <a href="#a9f1c02afefdd48c31913e6c358422727">More...</a><br /></td></tr>
<tr class="separator:a9f1c02afefdd48c31913e6c358422727"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a576b1f78c5f05e1d9dd1ec8311f7607d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a576b1f78c5f05e1d9dd1ec8311f7607d">open</a> (const perf_event_attr &amp;perf_config)</td></tr>
<tr class="memdesc:a576b1f78c5f05e1d9dd1ec8311f7607d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open the specified configuration.  <a href="#a576b1f78c5f05e1d9dd1ec8311f7607d">More...</a><br /></td></tr>
<tr class="separator:a576b1f78c5f05e1d9dd1ec8311f7607d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ae591df94fc66ccb85cbb6565368bca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a5ae591df94fc66ccb85cbb6565368bca">close</a> ()</td></tr>
<tr class="memdesc:a5ae591df94fc66ccb85cbb6565368bca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close the currently open counter.  <a href="#a5ae591df94fc66ccb85cbb6565368bca">More...</a><br /></td></tr>
<tr class="separator:a5ae591df94fc66ccb85cbb6565368bca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad20897c5c8bd47f5d4005989bead0e55"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#ad20897c5c8bd47f5d4005989bead0e55">reset</a> ()</td></tr>
<tr class="memdesc:ad20897c5c8bd47f5d4005989bead0e55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset counter.  <a href="#ad20897c5c8bd47f5d4005989bead0e55">More...</a><br /></td></tr>
<tr class="separator:ad20897c5c8bd47f5d4005989bead0e55"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class provides access to CPU hardware counters. </p>

<p>Definition at line <a class="el" href="_p_m_u_8h_source.xhtml#l00043">43</a> of file <a class="el" href="_p_m_u_8h_source.xhtml">PMU.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="af16eae86d803112e6466140aaced812b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml">PMU</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default constructor. </p>

<p>Definition at line <a class="el" href="_p_m_u_8cpp_source.xhtml#l00037">37</a> of file <a class="el" href="_p_m_u_8cpp_source.xhtml">PMU.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    : _perf_config()</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;{</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    _perf_config.type = PERF_TYPE_HARDWARE;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    _perf_config.size = <span class="keyword">sizeof</span>(perf_event_attr);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="comment">// Start disabled</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    _perf_config.disabled = 1;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="comment">// The inherit bit specifies that this counter should count events of child</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="comment">// tasks as well as the task specified</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    _perf_config.inherit = 1;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="comment">// Enables saving of event counts on context switch for inherited tasks</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    _perf_config.inherit_stat = 1;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a96bc7297c283c973784c216437bae762"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml">PMU</a> </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create <a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml" title="Class provides access to CPU hardware counters. ">PMU</a> with specified counter. </p>
<p>This constructor automatically calls <a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a9f1c02afefdd48c31913e6c358422727">open</a> with the default configuration.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">config</td><td>Counter identifier. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_p_m_u_8cpp_source.xhtml#l00052">52</a> of file <a class="el" href="_p_m_u_8cpp_source.xhtml">PMU.cpp</a>.</p>

<p>References <a class="el" href="_p_m_u_8cpp_source.xhtml#l00063">PMU::open()</a>.</p>
<div class="fragment"><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    : <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#af16eae86d803112e6466140aaced812b">PMU</a>()</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;{</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a9f1c02afefdd48c31913e6c358422727">open</a>(config);</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_p_m_u_xhtml_a9f1c02afefdd48c31913e6c358422727"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a9f1c02afefdd48c31913e6c358422727">arm_compute::test::framework::PMU::open</a></div><div class="ttdeci">void open(uint64_t config)</div><div class="ttdoc">Open the specified counter based on the default configuration. </div><div class="ttdef"><b>Definition:</b> <a href="_p_m_u_8cpp_source.xhtml#l00063">PMU.cpp:63</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_p_m_u_xhtml_af16eae86d803112e6466140aaced812b"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#af16eae86d803112e6466140aaced812b">arm_compute::test::framework::PMU::PMU</a></div><div class="ttdeci">PMU()</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> <a href="_p_m_u_8cpp_source.xhtml#l00037">PMU.cpp:37</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab30d96d1a047f366dd309049f139fa35"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">~<a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml">PMU</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default destructor. </p>

<p>Definition at line <a class="el" href="_p_m_u_8cpp_source.xhtml#l00058">58</a> of file <a class="el" href="_p_m_u_8cpp_source.xhtml">PMU.cpp</a>.</p>

<p>References <a class="el" href="_p_m_u_8cpp_source.xhtml#l00083">PMU::close()</a>.</p>
<div class="fragment"><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;{</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a5ae591df94fc66ccb85cbb6565368bca">close</a>();</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_p_m_u_xhtml_a5ae591df94fc66ccb85cbb6565368bca"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a5ae591df94fc66ccb85cbb6565368bca">arm_compute::test::framework::PMU::close</a></div><div class="ttdeci">void close()</div><div class="ttdoc">Close the currently open counter. </div><div class="ttdef"><b>Definition:</b> <a href="_p_m_u_8cpp_source.xhtml#l00083">PMU.cpp:83</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a5ae591df94fc66ccb85cbb6565368bca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void close </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close the currently open counter. </p>

<p>Definition at line <a class="el" href="_p_m_u_8cpp_source.xhtml#l00083">83</a> of file <a class="el" href="_p_m_u_8cpp_source.xhtml">PMU.cpp</a>.</p>

<p>Referenced by <a class="el" href="_p_m_u_8cpp_source.xhtml#l00058">PMU::~PMU()</a>.</p>
<div class="fragment"><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;{</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="keywordflow">if</span>(_fd != -1)</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    {</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a5ae591df94fc66ccb85cbb6565368bca">::close</a>(_fd);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        _fd = -1;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    }</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_p_m_u_xhtml_a5ae591df94fc66ccb85cbb6565368bca"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a5ae591df94fc66ccb85cbb6565368bca">arm_compute::test::framework::PMU::close</a></div><div class="ttdeci">void close()</div><div class="ttdoc">Close the currently open counter. </div><div class="ttdef"><b>Definition:</b> <a href="_p_m_u_8cpp_source.xhtml#l00083">PMU.cpp:83</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="accfba41ff73f99ee744f8619f47bf413"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">T get_value </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the counter value. </p>
<dl class="section return"><dt>Returns</dt><dd>Counter value casted to the specified type. </dd></dl>

<p>Definition at line <a class="el" href="_p_m_u_8h_source.xhtml#l00085">85</a> of file <a class="el" href="_p_m_u_8h_source.xhtml">PMU.h</a>.</p>

<p>References <a class="el" href="core_2_error_8h_source.xhtml#l00238">ARM_COMPUTE_ERROR</a>, and <a class="el" href="hwc_8hpp_source.xhtml#l00278">value</a>.</p>

<p>Referenced by <a class="el" href="_p_m_u_counter_8cpp_source.xhtml#l00043">PMUCounter::stop()</a>.</p>
<div class="fragment"><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;{</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    T             <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>{};</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keyword">const</span> ssize_t result = read(_fd, &amp;<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>, <span class="keyword">sizeof</span>(T));</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordflow">if</span>(result == -1)</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    {</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <a class="code" href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Can&#39;t get PMU counter value: %d&quot;</span>, errno);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    }</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;}</div><div class="ttc" id="core_2_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00238">Error.h:238</a></div></div>
<div class="ttc" id="hwc_8hpp_xhtml_a0f61d63b009d0880a89c843bd50d8d76"><div class="ttname"><a href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a></div><div class="ttdeci">void * value</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00278">hwc.hpp:278</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9f1c02afefdd48c31913e6c358422727"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void open </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Open the specified counter based on the default configuration. </p>

<p>Definition at line <a class="el" href="_p_m_u_8cpp_source.xhtml#l00063">63</a> of file <a class="el" href="_p_m_u_8cpp_source.xhtml">PMU.cpp</a>.</p>

<p>Referenced by <a class="el" href="_p_m_u_8cpp_source.xhtml#l00052">PMU::PMU()</a>.</p>
<div class="fragment"><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;{</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    _perf_config.config = config;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a9f1c02afefdd48c31913e6c358422727">open</a>(_perf_config);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_p_m_u_xhtml_a9f1c02afefdd48c31913e6c358422727"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml#a9f1c02afefdd48c31913e6c358422727">arm_compute::test::framework::PMU::open</a></div><div class="ttdeci">void open(uint64_t config)</div><div class="ttdoc">Open the specified counter based on the default configuration. </div><div class="ttdef"><b>Definition:</b> <a href="_p_m_u_8cpp_source.xhtml#l00063">PMU.cpp:63</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a576b1f78c5f05e1d9dd1ec8311f7607d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void open </td>
          <td>(</td>
          <td class="paramtype">const perf_event_attr &amp;&#160;</td>
          <td class="paramname"><em>perf_config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Open the specified configuration. </p>

<p>Definition at line <a class="el" href="_p_m_u_8cpp_source.xhtml#l00069">69</a> of file <a class="el" href="_p_m_u_8cpp_source.xhtml">PMU.cpp</a>.</p>

<p>References <a class="el" href="core_2_error_8h_source.xhtml#l00238">ARM_COMPUTE_ERROR</a>, and <a class="el" href="core_2_error_8h_source.xhtml#l00297">ARM_COMPUTE_ERROR_ON_MSG</a>.</p>
<div class="fragment"><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;{</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="comment">// Measure this process/thread (+ children) on any CPU</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    _fd = syscall(__NR_perf_event_open, &amp;perf_config, 0, -1, -1, 0);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <a class="code" href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(_fd &lt; 0, <span class="stringliteral">&quot;perf_event_open failed&quot;</span>);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> result = ioctl(_fd, PERF_EVENT_IOC_ENABLE, 0);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordflow">if</span>(result == -1)</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    {</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <a class="code" href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Failed to enable PMU counter: %d&quot;</span>, errno);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    }</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;}</div><div class="ttc" id="core_2_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00238">Error.h:238</a></div></div>
<div class="ttc" id="core_2_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00297">Error.h:297</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad20897c5c8bd47f5d4005989bead0e55"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reset counter. </p>

<p>Definition at line <a class="el" href="_p_m_u_8cpp_source.xhtml#l00092">92</a> of file <a class="el" href="_p_m_u_8cpp_source.xhtml">PMU.cpp</a>.</p>

<p>References <a class="el" href="core_2_error_8h_source.xhtml#l00238">ARM_COMPUTE_ERROR</a>.</p>

<p>Referenced by <a class="el" href="_p_m_u_counter_8cpp_source.xhtml#l00037">PMUCounter::start()</a>.</p>
<div class="fragment"><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;{</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> result = ioctl(_fd, PERF_EVENT_IOC_RESET, 0);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordflow">if</span>(result == -1)</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    {</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <a class="code" href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Failed to reset PMU counter: %d&quot;</span>, errno);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    }</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;}</div><div class="ttc" id="core_2_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00238">Error.h:238</a></div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>tests/framework/instruments/<a class="el" href="_p_m_u_8h_source.xhtml">PMU.h</a></li>
<li>tests/framework/instruments/<a class="el" href="_p_m_u_8cpp_source.xhtml">PMU.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test.xhtml">test</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test_1_1framework.xhtml">framework</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_p_m_u.xhtml">PMU</a></li>
    <li class="footer">Generated on Fri Mar 2 2018 12:38:00 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
